package Person.ith_11;

class Animal {
     String name = "二哈";
    void read()
    {
        System.out.println("狗的叫声");
    }
}
class Dog extends Animal{
   @Override
   public void read(){
       super.read();
       System.out.println("汪汪汪");
   }
   public void printName()
    {
        System.out.println("名字： "+super.name);
    }
}
 class Main{
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.read();
        dog.printName();
    }
}

